<template>
  <div class="common-page f-c">
    <BackPage title="中介服务领域比选项目信息" />
    <div class="search-params f-r a-c j-b">
      <el-form inline>
        <el-form-item label="项目名称：">
          <el-input clearable v-model="searchParams.projectName" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" round @click="onSearch">筛选</el-button>
          <el-button round @click="onReset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="table-box f-g">
      <el-table
        height="100%"
        v-loading="loading"
        stripe
        :data="tableData"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.8)"
        @selection-change="onSelect"
      >
        <el-table-column type="index" width="80px" label="序号" align="center" />
        <el-table-column v-for="item in columns" :key="item.prop" :prop="item.prop" :label="item.label" align="center" />
        <el-table-column label="操作" fixed="right" width="100px">
          <template slot-scope="scope">
            <el-button type="text" @click="onRead(scope.row)">查看详情</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div class="page-box">
      <el-pagination
        background
        :current-page="pageNo"
        :page-sizes="pageSizes"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="totalSize"
        @size-change="changePageSize"
        @current-change="changePageNo"
      />
    </div>
    <BusInfoAdd ref="BusInfoAddRef" />
  </div>
</template>

<script>
import crud from '@/mixins/crud'
import BusInfoAdd from './bus-info-add'
import { http_intermediary_serve_bus } from '@/api'
export default {
  name: 'Index',
  components: {
    BusInfoAdd
  },
  mixins: [crud],
  data() {
    return {
      request: http_intermediary_serve_bus,
      searchParams: {
        projectName: '',
      },
      columns: [
        { prop: 'projectNo', label: '项目登记号' },
        { prop: 'projectName', label: '项目名称' },
        { prop: 'applicatName', label: '项目业主' },
        { prop: 'address', label: '项目地址' },
        { prop: 'serviceName', label: '服务事项' },
      ],
      tableData: [
      ]
    }
  },
  methods: {
    onRead(item) {
      this.$refs.BusInfoAddRef.open(item)
    },
    onAdd() {
      this.$refs.BusInfoAddRef.open()
    }
  }
}
</script>

<style scoped lang="scss">
</style>
